package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.bean.model.SysAccessMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 密钥对应可用菜单
 * @author LGH
 */
public interface SysAccessMenuMapper extends BaseMapper<SysAccessMenu> {
    /**
     * 根据角色id 批量添加角色与菜单关系
     *
     * @param sysAccessKeyId     角色ID
     * @param menuIdList 角色与菜单关系列表
     */
    void insertAccessKeyAndMenu(@Param("sysAccessKeyId") Long sysAccessKeyId, @Param("menuIdList") List<Long> menuIdList);

    /**
     * 获取关联平台端菜单权限
     *
     * @param sysAccessKeyId
     * @return
     */
    List<String> queryAllPermsBySysMenu(@Param("sysAccessKeyId") Long sysAccessKeyId);
    /**
     * 获取关联商家端关联权限
     *
     * @param sysAccessKeyId
     * @return
     */
    List<String> queryAllPermsByShopMenu(@Param("sysAccessKeyId") Long sysAccessKeyId);
}
